<template>
	<!-- 装配终检 -->
	<div>
		<v-dialog v-if="Model!=null" v-model="checkInfo.assemblyCheckEditDialog" fullscreen
			transition="dialog-bottom-transition">
			<v-card>
				<v-toolbar dark color="primary">
					<v-btn icon dark @click="close">
						<v-icon>mdi-close</v-icon>
					</v-btn>
					<v-toolbar-title>装配终检报告（单机测试报告）</v-toolbar-title>
					<v-spacer></v-spacer>
				</v-toolbar>
				<v-card-text>
					<v-form ref="form" v-model="vaildateModel">
						<v-alert text color="blue-grey" class="text-center">项目基本信息</v-alert>
						<v-row>
							<v-col cols="12" sm="6" md="2">
								<v-text-field label="项目编号" disabled v-model="Model.projectcode" dense outlined>
								</v-text-field>
							</v-col>
							<v-col cols="12" sm="6" md="2">
								<v-text-field label="设备名称" disabled v-model="Model.equname" dense outlined>
								</v-text-field>
							</v-col>
							<v-col cols="12" sm="6" md="2">
								<v-text-field label="设备图号" disabled v-model="Model.piccode" dense outlined>
								</v-text-field>
							</v-col>
							<v-col cols="12" sm="6" md="2">
								<v-text-field label="设备型号" disabled v-model="Model.equmodel" dense outlined>
								</v-text-field>
							</v-col>
							<v-col cols="12" sm="6" md="2">
								<v-text-field label="设计人" disabled v-model="Model.designer" dense outlined>
								</v-text-field>
							</v-col>
							<v-col cols="12" sm="6" md="2">
								<v-text-field label="数量" disabled v-model="Model.qty" dense outlined>
								</v-text-field>
							</v-col>
							<v-col cols="12" sm="6" md="2">
								<v-text-field label="检测日期" disabled v-model="Model.checkdate" dense outlined>
								</v-text-field>
							</v-col>
							<v-col cols="12" sm="6" md="2">
								<v-text-field label="装配人" disabled v-model="Model.assemblyer" dense outlined>
								</v-text-field>
							</v-col>
							<v-col cols="12" sm="6" md="2">
								<v-text-field label="检测人" disabled v-model="Model.checkuser" dense outlined>
								</v-text-field>
							</v-col>
							<v-col cols="12" sm="6" md="2">
								<v-text-field label="检查数量" v-model="Model.checkqty" :rules="qtyRule" dense outlined>
								</v-text-field>
							</v-col>

							<!-- 	<v-col cols="12" sm="6" md="2">
								<v-text-field label="检测依据" v-model="Model.checkaccording" dense outlined>
								</v-text-field>
							</v-col> -->
						</v-row>
						<v-alert text color="blue-grey" class="text-center">检测项目（外形尺寸）</v-alert>
						<v-row>
							<v-col cols="6">
								<v-alert text color="blue-grey" class="text-center">外形尺寸（要求）</v-alert>
								<v-row>
									<v-col cols="12">
										<v-text-field label="长宽高" v-model="Model.lengthwidthheighttemplate" dense
											outlined>
										</v-text-field>
									</v-col>
									<v-col cols="12">
										<v-text-field label="水平（不大于)" v-model="Model.levelstandardtemplate" dense
											outlined>
										</v-text-field>
									</v-col>
									<v-col cols="12">
										<v-text-field label=" 对角/误差（不大于）" v-model="Model.diagonaltemplate" dense
											outlined>
										</v-text-field>
									</v-col>
								</v-row>
							</v-col>
							<v-col cols="6">
								<v-alert text color="blue-grey" class="text-center">外形尺寸（实测）</v-alert>
								<v-row>
									<v-col cols="12">
										<v-text-field label="长宽高" v-model="Model.lengthwidthheightvalue" dense outlined>
										</v-text-field>
									</v-col>
									<v-col cols="12">
										<v-text-field label="水平（不大于)" v-model="Model.levelstandardvalue" dense outlined>
										</v-text-field>
									</v-col>
									<v-col cols="12">
										<v-text-field label=" 对角/误差（不大于）" v-model="Model.diagonalvalue" dense outlined>
										</v-text-field>
									</v-col>
								</v-row>
							</v-col>
						</v-row>
						<v-alert text color="blue-grey" class="text-center">检测项目（设计要求）</v-alert>
						<v-row>

							<v-col cols="6">
								<v-alert text color="blue-grey" class="text-center">设计要求（要求）</v-alert>
								<v-row>
									<v-col cols="12">
										<v-text-field label="载荷/KG" v-model="Model.loadtemplate" dense outlined>
										</v-text-field>
									</v-col>
									<v-col cols="12">
										<v-text-field label="速度/M/min" v-model="Model.speedtemplate" dense outlined>
										</v-text-field>
									</v-col>
									<v-col cols="12">
										<v-text-field label="噪音/70 db" disabled v-model="Model.noisetemplate" dense
											outlined>
										</v-text-field>
									</v-col>
									<v-col cols="12">
										<v-text-field label="震动" v-model="Model.vibrationtemplate" dense outlined>
										</v-text-field>
									</v-col>
									<v-col cols="12">
										<v-text-field label="电机工作温度-20～40℃" disabled v-model="Model.temperaturetemplate"
											dense outlined>
										</v-text-field>
									</v-col>
									<v-col cols="12">
										<v-text-field label="控制卡" v-model="Model.controlcardtemplate" dense outlined>
										</v-text-field>
									</v-col>
								</v-row>
							</v-col>
							<v-col cols="6">
								<v-row>
									<v-col cols="6">
										<v-alert text color="blue-grey" class="text-center">设计要求（实测）</v-alert>
										<v-row>
											<v-col cols="12" md="6">
												<v-text-field label="载荷/KG" v-model="Model.loadvalue" dense outlined>
												</v-text-field>
											</v-col>
											<v-col cols="12" md="6">
												<v-checkbox label="实测是否合格" dense v-model="Model.loadvalueok">
												</v-checkbox>
											</v-col>

											<v-col cols="12" md="6">
												<v-text-field label="速度/M/min" v-model="Model.speedvalue" dense
													outlined>
												</v-text-field>
											</v-col>
											<v-col cols="12" md="6">
												<v-checkbox label="实测是否合格" dense v-model="Model.speedvalueok">
												</v-checkbox>
											</v-col>

											<v-col cols="12" md="6">
												<v-text-field label="噪音/70 db" v-model="Model.noisevalue" dense
													outlined>
												</v-text-field>
											</v-col>
											<v-col cols="12" md="6">
												<v-checkbox label="实测是否合格" dense v-model="Model.noisevalueok">
												</v-checkbox>
											</v-col>

											<v-col cols="12" md="6">
												<v-text-field label="震动" v-model="Model.vibrationvalue" dense outlined>
												</v-text-field>
											</v-col>
											<v-col cols="12" md="6">
												<v-checkbox label="实测是否合格" dense v-model="Model.vibrationvalueok">
												</v-checkbox>
											</v-col>

											<v-col cols="12" md="6">
												<v-text-field label="电机工作温度-20～40℃" v-model="Model.temperaturevalue"
													dense outlined>
												</v-text-field>
											</v-col>
											<v-col cols="12" md="6">
												<v-checkbox label="实测是否合格" dense v-model="Model.temperaturevalueok">
												</v-checkbox>
											</v-col>
											<v-col cols="12" md="6">
												<v-text-field label="控制卡" v-model="Model.controlcardvalue" dense
													outlined>
												</v-text-field>
											</v-col>
											<v-col cols="12" md="6">
												<v-checkbox label="实测是否合格" dense v-model="Model.controlcardvalueok">
												</v-checkbox>
											</v-col>
										</v-row>

									</v-col>
									<v-col cols="6">
										<v-alert text color="blue-grey" class="text-center">外观要求（实测）</v-alert>
										<v-row>
											<v-col cols="12">
												<v-checkbox label="静电喷涂厚度60～80um" dense
													v-model="Model.electrostaticcoatingthicknessok">
												</v-checkbox>
											</v-col>
											<v-col cols="12">
												<v-checkbox label="镀锌件是否合格" dense v-model="Model.galvanizedpartsok">
												</v-checkbox>
											</v-col>
											<v-col cols="12">
												<v-checkbox label="无尖角毛刺" dense v-model="Model.nosharpburrok">
												</v-checkbox>
											</v-col>
											<v-col cols="12">
												<v-checkbox label="无损伤" dense v-model="Model.nodamageok">
												</v-checkbox>
											</v-col>
											<v-col cols="12">
												<v-checkbox label="无污渍" dense v-model="Model.nostainok">
												</v-checkbox>
											</v-col>
											<v-col cols="12">
												<v-checkbox label="电\气\路合理美观" dense
													v-model="Model.electricitygasbeautifulok">
												</v-checkbox>
											</v-col>
										</v-row>
									</v-col>
								</v-row>

							</v-col>
						</v-row>

						<v-textarea outlined name="input-7-4" label="特殊要求" v-model="Model.description"
							:value="Model.description"></v-textarea>

					</v-form>

				</v-card-text>
				<p class="text-center mb-7">
					<v-spacer></v-spacer>
					<v-btn color="blue darken-1" class="ml-4" tile dark @click="submitAssemblyModel">
						确定
					</v-btn>
					<v-btn color="blue darken-1" class="ml-4" tile dark @click="close">
						关闭
					</v-btn>
					<v-btn color="blue darken-1" class="ml-4" tile dark @click="printQADialog=true">
						打印
					</v-btn>
					<v-btn color="success darken-1" class="ml-4" tile dark @click="inStorageDialog=true">
						检验完成
					</v-btn>

				</p>
			</v-card>
		</v-dialog>

		<v-dialog v-model="inStorageDialog" width="500">
			<v-card>
				<v-card-title>维护入库相关信息</v-card-title>
				<v-card-text>
					<v-select label="选择入库仓库" dense outlined v-model="warehouse" :items="storageInfoList">
					</v-select>
					<v-select label="选择入库类型" dense outlined v-model="inStorageType" :items="inStorageTypeList">
					</v-select>
				</v-card-text>
				<v-card-actions>
					<v-spacer></v-spacer>
					<v-btn color="blue darken-1" class="ml-4" tile dark @click="completeCheck">
						确定
					</v-btn>
					<v-btn color="blue darken-1" class="ml-4" tile dark @click="inStorageDialog=false">
						关闭
					</v-btn>
				</v-card-actions>
			</v-card>
		</v-dialog>

		<v-dialog v-if="Model!=null" v-model="printQADialog" persistent max-width="1250px">
			<v-card>
				<v-card-title></v-card-title>
				<v-card-text>

					<div class="dayin">
						<div ref="assembly_check_edit" id="assembly_check_edit">
							<div class="text-center mb-2" style="margin-left: 200px;">
								<div style="display: inline-block;vertical-align: middle;margin-bottom: 10px;">
									<img src="../../../../../../public/image/companylog.png" />
								</div>
								<div>
									<div class="font-weight-bold" style="inline-block;vertical-align: middle;">
										<p style="letter-spacing:5px;">昆山同日工业自动化有限公司</p>
										<p style="letter-spacing:2px;">Tungray lndustrial Automation ( Kunshan )
											Co.,Ltd.</p>
									</div>
								</div>
							</div>
							<div class="text-center mb-5" style="letter-spacing:35px;margin-left: 200px;">
								<h1>成品单机测试报告</h1>
							</div>

							<table class="tab">
								<tbody class="top-tbody">

									<tr style="height:25px;">
										<td colspan="1" rowspan="3" style="width:95px;font-weight:bold">项目编号</td>
										<td colspan="1" rowspan="3" style="width:280px;text-align: center;">
											{{Model.projectcode}}
										</td>
										<td style="width:95px;font-weight:bold">设备名称</td>
										<td style="width:95px;font-weight:bold;text-align: center;">
											{{Model.equname}}
										</td>
										<td style="width:95px;font-weight:bold">设备图号</td>
										<td style="width:95px;font-weight:bold;text-align: center;">
											{{Model.piccode}}
										</td>
										<td style="width:95px;font-weight:bold">检测日期</td>
										<td style="width:95px;font-weight:bold;text-align: center;">
											{{Model.checkdate}}
										</td>
									</tr>
									<tr style="height:25px;">
										<td style="width:95px;font-weight:bold">设备型号</td>
										<td style="width:280px;text-align: center;">
											{{Model.equmodel}}
										</td>
										<td style="width:95px;font-weight:bold">设计人</td>
										<td style="width:95px;font-weight:bold;text-align: center;">
											{{Model.designer}}
										</td>
										<td style="width:95px;font-weight:bold">数量</td>
										<td style="width:95px;font-weight:bold;text-align: center;">
											{{Model.qty}}
										</td>
									</tr>
									<tr style="height:25px;">
										<td style="width:95px;font-weight:bold">装配人</td>
										<td style="width:280px;text-align: center;">
											{{Model.assemblyer}}
										</td>
										<td style="width:95px;font-weight:bold">检测人</td>
										<td style="width:95px;font-weight:bold;text-align: center;">
											{{Model.checkuser}}
										</td>
										<td style="width:95px;font-weight:bold">检测数量</td>
										<td style="width:95px;font-weight:bold;text-align: center;">
											{{Model.checkqty}}
										</td>
									</tr>
									<tr class="tr-head" style="height:25px;border-bottom:1px solid #000;">
										<td style="font-weight:bold; text-align:center;" colspan="8">检测依据: 合同 & 技术规范 &
											行业规范</td>
									</tr>
									<tr class="tr-head" style="height:25px;border-bottom:1px solid #000;">
										<td style="font-weight:bold; text-align:center;" colspan="8">检 测 项 目</td>
									</tr>
									<tr class="tr-head" style="height:25px;border-bottom:1px solid #000;">
										<td colspan="1" rowspan="4"
											style="font-weight:bold; text-align:center;writing-mode:tb-rl;">外形尺寸
										</td>
										<td style="font-weight:bold; text-align:center;" colspan="4">要求</td>
										<td style="font-weight:bold; text-align:center;" colspan="3">实测</td>
									</tr>
									<tr class="tr-head" style="height:25px;border-bottom:1px solid #000;">
										<td style="font-weight:bold; text-align:left;" colspan="4">
											长宽高:{{Model.lengthwidthheighttemplate}}</td>
										<td style="font-weight:bold; text-align:center;" colspan="3">
											{{Model.lengthwidthheightvalue}}
										</td>
									</tr>
									<tr class="tr-head" style="height:25px;border-bottom:1px solid #000;">
										<td style="font-weight:bold; text-align:left;" colspan="4">
											水平(不大于):{{Model.levelstandardtemplate}}</td>
										<td style="font-weight:bold; text-align:center;" colspan="3">
											{{Model.levelstandardvalue}}
										</td>
									</tr>
									<tr class="tr-head" style="height:25px;border-bottom:1px solid #000;">
										<td style="font-weight:bold; text-align:left;" colspan="4">
											对角/误差(不大于):{{Model.diagonaltemplate}}</td>
										<td style="font-weight:bold; text-align:center;" colspan="3">
											{{Model.diagonalvalue}}
										</td>
									</tr>
									<tr class="tr-head" style="height:25px;border-bottom:1px solid #000;">
										<td colspan="1" rowspan="7"
											style="font-weight:bold; text-align:center;writing-mode:tb-rl;">设计要求
										</td>
										<td style="font-weight:bold; text-align:center;" colspan="2">要求</td>
										<td style="font-weight:bold; text-align:center;" colspan="1">实测</td>
										<td style="font-weight:bold; text-align:center;" colspan="1">合格是/否</td>
										<td style="font-weight:bold; text-align:center;" colspan="2">外观要求</td>
										<td style="font-weight:bold; text-align:center;" colspan="1">合格是/否</td>
									</tr>
									<tr class="tr-head" style="height:25px;border-bottom:1px solid #000;">
										<td style="font-weight:bold;text-align:center;" colspan="2">
											<span>载荷:</span>
											{{Model.loadtemplate}}KG
										</td>
										<td style="font-weight:bold; text-align:center;" colspan="1">
											{{Model.loadvalue}}KG
										</td>
										<td style="font-weight:bold; text-align:center;" colspan="1">
											{{Model.loadvalueok?"是":"否"}}
										</td>
										<td style="font-weight:bold; text-align:center;" colspan="2">静电喷涂厚度60～80um</td>
										<td style="font-weight:bold; text-align:center;" colspan="1">
											{{Model.electrostaticcoatingthicknessok?"是":"否"}}
										</td>
									</tr>
									<tr class="tr-head" style="height:25px;border-bottom:1px solid #000;">
										<td style="font-weight:bold; text-align:center;" colspan="2">
											<span>速度:</span>
											{{Model.speedtemplate}}M/min
										</td>
										<td style="font-weight:bold; text-align:center;" colspan="1">
											{{Model.speedvalue}} M/min
										</td>
										<td style="font-weight:bold; text-align:center;" colspan="1">
											{{Model.speedvalueok?"是":"否"}}
										</td>
										<td style="font-weight:bold; text-align:center;" colspan="2">镀锌件是否合格</td>
										<td style="font-weight:bold; text-align:center;" colspan="1">
											{{Model.galvanizedpartsok?"是":"否"}}
										</td>
									</tr>
									<tr class="tr-head" style="height:25px;border-bottom:1px solid #000;">
										<td style="font-weight:bold; text-align:center;" colspan="2">
											<span>噪音:</span>{{Model.noisetemplate}}db
										</td>
										<td style="font-weight:bold; text-align:center;" colspan="1">
											{{Model.noisevalue}}db
										</td>
										<td style="font-weight:bold; text-align:center;" colspan="1">
											{{Model.noisevalueok?"是":"否"}}
										</td>
										<td style="font-weight:bold; text-align:center;" colspan="2">无尖角毛刺</td>
										<td style="font-weight:bold; text-align:center;" colspan="1">
											{{Model.nosharpburrok?"是":"否"}}
										</td>
									</tr>
									<tr class="tr-head" style="height:25px;border-bottom:1px solid #000;">
										<td style="font-weight:bold; text-align:center;" colspan="2">
											<span>震动:</span>{{Model.vibrationtemplate}}
										</td>
										<td style="font-weight:bold; text-align:center;" colspan="1">
											<span>{{Model.vibrationvalue}}</span>
										</td>
										<td style="font-weight:bold; text-align:center;" colspan="1">
											{{Model.vibrationvalueok?"是":"否"}}
										</td>
										<td style="font-weight:bold; text-align:center;" colspan="2">无损伤</td>
										<td style="font-weight:bold; text-align:center;" colspan="1">
											{{Model.nodamageok?"是":"否"}}
										</td>
									</tr>
									<tr class="tr-head" style="height:25px;border-bottom:1px solid #000;">
										<td style="font-weight:bold; text-align:center;" colspan="2">
											电机工作温度-20～40℃
										</td>
										<td style="font-weight:bold; text-align:center;" colspan="1">
											{{Model.temperaturevalue}}℃
										</td>
										<td style="font-weight:bold; text-align:center;" colspan="1">
											{{Model.temperaturevalueok?"是":"否"}}
										</td>
										<td style="font-weight:bold; text-align:center;" colspan="2">无污渍</td>
										<td style="font-weight:bold; text-align:center;" colspan="1">
											{{Model.nostainok?"是":"否"}}
										</td>
									</tr>
									<tr class="tr-head" style="height:25px;border-bottom:1px solid #000;">
										<td style="font-weight:bold; text-align:center;" colspan="2">
											<span>控制卡:</span>
											{{Model.controlcardtemplate}}
										</td>
										<td style="font-weight:bold; text-align:center;" colspan="1">
											<span>{{Model.controlcardvalue}}</span>
										</td>
										<td style="font-weight:bold; text-align:center;" colspan="1">
											{{Model.controlcardvalueok?"是":"否"}}
										</td>
										<td style="font-weight:bold; text-align:center;" colspan="2">电\气\路合理美观</td>
										<td style="font-weight:bold; text-align:center;" colspan="1">
											{{Model.electricitygasbeautifulok?"是":"否"}}
										</td>
									</tr>
								</tbody>
							</table>
							<p class="mt-4">特殊要求:<span class="ml-1">{{Model.description}}</span></p>
							<p class="mt-8">主管部门批核及签章: <span style="margin-left: 400px;">产品合格</span> <span class="ml-8">
									同意出厂</span>
							</p>
						</div>
					</div>
				</v-card-text>
				<v-card-actions>
					<v-spacer></v-spacer>
					<div class="no-print">
						<v-btn color="primary" text @click="printContext">打印</v-btn>
						<v-btn color="primary" text @click="printQADialog=false">关闭</v-btn>
					</div>
				</v-card-actions>
			</v-card>
		</v-dialog>

	</div>
</template>

<script>
	import {
		format,
		parseISO
	} from 'date-fns'
	import print from 'print-js'
	export default {
		name: 'assembly_check_edit',
		props: {
			callBackLoadProcessCards: {
				type: Function, //参数类型：函数
			},
			checkInfo: {
				cardModel: {},
				assemblyCheckEditDialog: false,
			}
		},
		data: () => ({
			Model: null,
			printQADialog: false,
			qtyRule: [
				v => /^[0-9]*$/.test(v) || '请输入合法数字',
				v => v >= 0 || '需求量不能小于0'
			],
			inStorageDialog: false,
			storageInfoList: [],
			inStorageTypeList: [],
			warehouse: null,
			inStorageType: "12",
		}),
		watch: {
			checkInfo: {
				handler(newVal) {
					console.log(newVal)
					this.$emit('update:checkInfo', newVal)
					this.loadAssemblyModel()
				},
				deep: true
			},
		},
		created() {
			this.loadStorageList()
			this.loadSyncGetOutRdtype()
		},
		methods: {
			//加载仓库信息
			async loadStorageList() {
				const response = await this.$httpRequest({
					url: `MES/MESQaAssembly/GetStorageList`,
					method: 'get'
				})

				if (response.status == 1) {
					this.storageInfoList = response.data
				}
			},
			//加载入库类型
			async loadSyncGetOutRdtype() {
				const response = await this.$httpRequest({
					url: `MES/MESQaAssembly/SyncGetRdtype`,
					method: 'get'
				})

				if (response.status == 1) {
					this.inStorageTypeList = response.data
				}
			},

			async loadAssemblyModel() {
				if (!this.checkInfo.assemblyCheckEditDialog)
					return

				var tempModel = await this.queryAssemblyModel(this.checkInfo.cardModel.childrenOrder.id)
				if (tempModel != null) {
					this.Model = tempModel
					if (this.Model.checkdate == null)
						this.Model.checkdate = format(parseISO(new Date().toISOString()), 'yyyy-MM-dd')
				} else {
					this.Model = {}
					this.Model.id = 0
					this.Model.childrenid = this.checkInfo.cardModel.childrenOrder.id
					this.Model.cardid = this.checkInfo.cardModel.id
					this.Model.projectcode = this.checkInfo.cardModel.childrenOrder.projectcode
					this.Model.projectname = this.checkInfo.cardModel.childrenOrder.projectname
					this.Model.equname = this.checkInfo.cardModel.childrenOrder.name
					this.Model.piccode = this.checkInfo.cardModel.childrenOrder.piccode
					this.Model.equmodel = this.checkInfo.cardModel.childrenOrder.model
					this.Model.designer = this.checkInfo.cardModel.childrenOrder.designer
					this.Model.qty = this.checkInfo.cardModel.childrenOrder.totalcount
					this.Model.checkdate = format(parseISO(new Date().toISOString()), 'yyyy-MM-dd')
					this.Model.qatype = 20
					// // 装配人
					// this.Model.assemblyer=this.checkInfo.cardModel.childrenOrder.assemblyer
					// // 检测人
					// this.Model.checkuser=this.checkInfo.cardModel.childrenOrder.checkuser
				}


			},
			async queryAssemblyModel(childrenid) {
				var response = await this.$httpRequest({
					url: `MES/MESQaAssembly/QueryByChildrenId?childrenid=${childrenid}`,
					method: 'get',
				})
				if (response.status == 1 && response.data != null) {
					return response.data
				}
				return null
			},
			//提交装配信息
			async submitAssemblyModel() {
				var operation = ""
				if (this.Model.id == 0)
					operation = 'AddCheck'
				else
					operation = 'UpdateCheck'
				var response = await this.$httpRequest({
					url: `MES/MESQaAssembly/${operation}`,
					method: 'post',
					data: this.Model
				})
				if (response.status == 1) {
					this.Model.id = response.data.id
					this.$message.success(response.info)
				} else {
					this.$message.error('添加装配终检信息失败！')
				}
			},
			//检验完成
			async completeCheck() {
				if (this.Model.id == 0) {
					this.$message.error('请先填写检验信息，确认后才能完成检验！')
					return
				}

				var response = await this.$httpRequest({
					url: `MES/MESQaAssembly/completeCheck?qaAssemblyId=${this.Model.id}&wareHouse=${this.warehouse}&inStorgeType=${this.inStorageType}`,
					method: 'get',
				})
				if (response.status == 1) {
					this.$message.success(response.info)
					this.close()
					this.$props.callBackLoadProcessCards()
				} else {
					this.$message.error(response.info)
				}
			},
			//验证表单
			vaildateModel() {

			},
			close() {
				this.inStorageDialog = false
				this.checkInfo.assemblyCheckEditDialog = false
			},
			printContext() {

				printJS({
					printable: 'assembly_check_edit',
					type: 'html',
					documentTitle: '装配终检',
					targetStyles: ['*'],
					ignoreElements: ['no-print'],
				})
			},
		}
	}
</script>

<style scoped>
	.main {
		background: #aaf5aa;
	}

	.dayin {
		/* 	width: 100%;
		height: 100%;
		display: flex;
		align-items: center;
		justify-content: center; */
		flex-direction: column;

		@media print {
			text-align: center;
			width: 100%;
			margin: auto;
			page-break-after: always;
			margin-top: 20px;
			font-family: "微软雅黑";
		}



		#print {
			text-align: center;

			.content {}

			.btn {}
		}
	}


	.tab {
		table-layout: fixed;
		width: 1200px;
		border-left: 1px solid #000;
		border-top: 1px solid #000;
		padding: 0px;
		margin: 0px;
		border-spacing: 0px;

		.top-tbody {}

		.bottom-tbody {
			.column-1 {
				width: 50px;
			}

			.column-2 {
				width: 180px;
			}

			.column-3 {
				width: 160px;
			}

			.column-4 {
				width: 120px;
			}

			.column-5 {
				width: 150px;
			}

			.column-body-1 {}

			.column-body-2 {}

			.column-body-3 {}

			.column-body-4 {}

			.column-body-5 {}
		}

		.tr-head {
			height: 25px;
		}

		.tr-body {}

		.td-bold {
			font-weight: bold;
		}

		.td-center {
			text-align: center;
		}

		.td-left {
			text-align: left;
		}

		.td-body-color {
			color: black;
		}
	}

	.Result0 {}

	.Result1 {
		color: gray;
	}

	.tab td {
		overflow: hidden;
		text-overflow: ellipsis;
		border-bottom: 1px solid #000;
		border-right: 1px solid #000;
		padding: 0px;
		margin: 0px;
		border-spacing: 1px;
	}
</style>
